//
//  TradeRecordViewController.m
//  lcf-newproject
//
//  Created by yangyang on 14-12-1.
//  Copyright (c) 2014年 yang. All rights reserved.
//

#import "TradeRecordViewController.h"
#import "ProjectTopTabBar.h"

@interface TradeRecordViewController () <ProjectTopTabBarDelegate>

@end

@implementation TradeRecordViewController

-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self hideTabBar:YES];
}

-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self hideTabBar:NO];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self uiConfig];
}
-(void)uiConfig{
    self.view.backgroundColor = [UIColor whiteColor];
    [self setNavigationBarTitle:@"投资记录"];
    [self setNavigationLeftBarWithTitle:nil withNormalImageName:@"wode.png" withSelectedImageName:nil withAction:@selector(backClick:)];
    
    NSArray * nameArray = @[@"投资明细",@"付本还息记录"];
    NSDictionary * dict = [NSDictionary dictionaryWithObject:nameArray forKey:@"tabBarName"];
    ProjectTopTabBar * tabBar = [[ProjectTopTabBar alloc]initWithFrame:CGRectMake(0, 0, __MainScreen_Width, ProjectTabBarHeight)withTabBarDict:dict];
    tabBar.delegate = self;
    [self.view addSubview:tabBar];

    
    
}

#pragma mark - ProjectTopBarDelegate
-(void)customTabBar:(ProjectTopTabBar *)custom didSelectedIndex:(NSInteger)index{
    
}

-(void)backClick:(UIButton *)btn{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
